forum

home / developersection / forums / report printing

Report Printing

Manmohan Jha 2637 14-Feb-2014
How to use two loop in printing...

bool MorePagesToPrint=false;
int i=0;
float yLineTop = e.MarginBounds.Top;
 while (i < 70)
{
if (yLineTop + lineHeight > e.MarginBounds.Bottom)
{
 MorePagesToPrint = true;
return;
}
 else
{
e.Graphics.DrawString("TEST: " + i, myFont, Brushes.Black, new PointF(e.MarginBounds.Left, yLineTop));
int j=0;
while (j < 70)
{
e.Graphics.DrawString("SUBTEST: " + j, myFont, Brushes.Black, new PointF(e.MarginBounds.Left, yLineTop));
//
yLineTop += lineHeight;
j++;
}
yLineTop += lineHeight;
 i++;
}
}

if (MorePagesToPrint)
e.HasMorePages = true;
else
e.HasMorePages = false;
First loop work well...
after using second loop...
problem problem
Help me...

c# c# 
Updated on 17-Feb-2014
Manmohan Jha

Other


Message
Can you answer this question?

Answer

2 Answers

Liked By